package com.example.swaggerDemo.Dao;

import com.example.swaggerDemo.entity.WuliaoEntity;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;
import java.util.List;

public interface WuliaoDao {
    public  int insert(@RequestParam("username") String openid, @RequestParam("nickname") String nickname
            , @RequestParam("type") String type, @RequestParam("amount") String amount,@RequestParam("phone") String phone, @RequestParam("address") String address);

    List<WuliaoEntity> findUserId(@RequestParam("userid") String userid,
                                  @RequestParam("pageindex") int pagindex,
                                  @RequestParam("pagesize") int pagesize
    ) throws SQLException;

    WuliaoEntity findByid(@RequestParam("id") String id) throws SQLException;

    List<WuliaoEntity> findadmin(@RequestParam("status") String status,@RequestParam("pageindex") int pagindex, @RequestParam("pagesize") int pagesize) throws SQLException;

    //状态:0=未发货,1=已发货
    int updatewuliaoType(@RequestParam("id") String id, @RequestParam("status") String status);
}
